import request from '@/utils/request'
export function getRoles () {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/GetRoles',
    method: 'get',
  })
}
export function getUsingEmployees (params) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/getUsingEmployees',
    method: 'get',
    params
  })
}
export function getEmployees (params) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/GetEmployees',
    method: 'get',
    params
  })
}
export function addEmployee (data) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/AddEmployee',
    method: 'post',
    data,
  })
}
export function editEmployee (data) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/EditEmployee',
    method: 'post',
    data,
  })
}

export function editEmployeeIncomeRate (data) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/EditEmployeeIncomeRate',
    method: 'post',
    data
  })
}

export function getEmployee (empId) {
  return request({
    url: '/api/Organiztion/CompanyEmployeeManage/GetEmployee',
    method: 'get',
    params: { empId }
  })
}


export function deleteEmployee (empId) {
  return request({
    url: '/api/Platform/CompanyManage/DeleteEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}
export function combineEmployee (params) {
  return request({
    url: '/api/Platform/CompanyManage/CombineEmployee',
    method: 'get',
    params
  })
}
export function freezeEmployee (empId) {
  return request({
    url: '/api/Platform/CompanyManage/FreezeEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}
export function unfreezeEmployee (empId) {
  return request({
    url: '/api/Platform/CompanyManage/UnFreezeEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}